import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  build: {
    rollupOptions: {
      output: {
        entryFileNames: `assets/[name].js`,
        chunkFileNames: `assets/[name].js`,
        assetFileNames: `assets/[name].[ext]`
      }
    }
  },
  base: './',
  resolve: {
    // ↓路径别名，主要是这部分
    alias: {
      "@": path.resolve(__dirname, "/src"),
      comps: path.resolve(__dirname, "/src/components"),
    }
  }
})
